snippet file "HQ: File comment block"
/**
 * @file   `!p snip.rv = snip.fn`
 * @brief  ${2}
 * @author hequn
 * @date   `!v strftime("%Y-%m-%d")`
 * @version 1.0
 * @note${3}
 *
 * $LastChangedDate$
 * $LastChangedRevision$
 * $LastChangedBy$
 */
${4}
endsnippet

snippet once "HQ: Include file guard"
#ifndef ${1:`!p
if not snip.c:
    snip.rv = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper()
else:
    snip.rv = snip.c`}
#define $1
${0}
#endif /* End of $1 */
endsnippet

snippet func "HQ: Function definition"
/*
 * @brief ${1}
 * @author hequn
 * @param[in] ${5}
 * @return ${6}
 * @note
 * @remarks
 */
${2:void} ${3:test}(${4:void})
{
    ${7}
}/* End of $3 */

${8}
endsnippet

snippet lfunc "HQ: Local function definition"
/*
 * @brief ${1}
 * @author hequn
 * @param[in] ${5}
 * @return ${6}
 * @note
 */
INLINE ${2:void} ${3:test}(${4:void})
{
    ${7}
}/* End of $3 */

${8}
endsnippet


snippet for "HQ: self define for loop"
for (${1}; ${2}; ${3}) {
    ${4}
}${5}
endsnippet

snippet if "HQ: self define if"
if (${1}) {
	${2}
}${3}
endsnippet

snippet el "HQ: self define else"
else {
    ${1}
}
endsnippet

snippet ife "HQ: self define if .. else"
if (${1}) {
    ${2}
} else {
    ${3}
}
endsnippet

